Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

188
Visualizações
Why does the "dist" folder have a "localhost:3000" code?

http://localhost:8080 -> error

PS C:\Users\shine\Desktop\Dev\node\project> npm run start

> with-typescript@1.0.0 start
> cross-env NODE_ENV=production node dist/server/index.js

info  - Loaded env from C:\Users\shine\Desktop\Dev\node\project\.env.production.local
info  - Loaded env from C:\Users\shine\Desktop\Dev\node\project\.env.production
info  - Loaded env from C:\Users\shine\Desktop\Dev\node\project\.env
info  - Using webpack 4. Reason: future.webpack5 option disabled https://nextjs.org/docs/messages/webpack5
Create MYSQL Connection....
ormconfig profile:  production
ormconfig profile is production:  true
ormconfig connection is localhost:  false
Load Entity Paths C:\Users\shine\Desktop\Dev\node\project\dist\server\entity\*.entity.js
Create MYSQL Connection....SUCCESS
process.env.PORT 8080
Server Running at :8080
ormconfig profile:  production
ormconfig profile is production:  true
ormconfig connection is localhost:  false
Load Entity Paths \\dist\server\entity\*.entity.js
[next-auth][error][client_fetch_error] 
https://next-auth.js.org/errors#client_fetch_error session FetchError: request to http://localhost:3000/api/auth/session failed, reason: connect ECONNREFUSED 127.0.0.1:3000
    at ClientRequest.<anonymous> (C:\Users\shine\Desktop\Dev\node\project\node_modules\next\node_modules\node-fetch\lib\index.js:1461:11)
    at ClientRequest.emit (node:events:390:28)
    at Socket.socketErrorListener (node:_http_client:447:9)
    at Socket.emit (node:events:390:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  type: 'system',
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED'
}

npm run build -> Why does the "dist" folder have a "localhost:3000" code?

package.json

"dev": "nodemon",
"build": "next build && tsc --project tsconfig.server.json",
"start": "cross-env NODE_ENV=production node dist/server/index.js",

.evn.production

PORT=8080
NEXT_PUBLIC_BASE_URL="http://localhost:8080"
NEXTAUTH_URL_INTERNAL=${NEXT_PUBLIC_BASE_URL}
NEXTAUTH_URL=${NEXT_PUBLIC_BASE_URL}
VERCEL_URL=${NEXT_PUBLIC_BASE_URL}

When the commands "npm run dev" and "npm run start" are executed together, it operates normally.

help me plz...

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda